package com.yohann.designPattern.strategy;

import com.yohann.designPattern.strategy.duck.PekingDuck;
import com.yohann.designPattern.strategy.duck.WildDuck;

/**
 * <p>
 * 客户端
 * </p>
 *
 * @author Yohann
 * @since 2021/2/13 18:24
 */
public class Client {
    public static void main(String[] args) {
        PekingDuck pekingDuck = new PekingDuck();

        /*
         * PekingDuck
         * NoFlyBehavior
         */
        pekingDuck.display();
        pekingDuck.fly();

        WildDuck wildDuck = new WildDuck();

        /*
         * WildDuck
         * GoodFlyBehavior
         */
        wildDuck.display();
        wildDuck.fly();
    }
}